<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>判断身体质量指数：</title>
</head>
<body>
    <script>
            document.write("<pre>")
        var bmi =23;
        if(bmi<=20){
            document.write("BMI:"+bmi+"\n")
            document.write("结果：体重过轻")
        }else if(bmi>=20 && bmi<=25){
            document.write("BMI:"+bmi+"\n")
            document.write("结果：体重适中")
        }else if(bmi>=25 && bmi<=30){
            document.write("BMI:"+bmi+"\n")
            document.write("结果：体重过重")
        }else if(bmi>=30 && bmi<=35){
            document.write("BMI:"+bmi+"\n")
            document.write("结果：体重肥胖")
        }else if(bmi>35){
            document.write("BMI:"+bmi+"\n")
            document.write("结果：体重非常肥胖")
        }
            document.write("</pre>")
    </script>
</body>
</html>